package com.fary.security.config.annotation.configuration;

import com.fary.beans.factory.config.AutowireCapableBeanFactory;
import com.fary.beans.factory.config.BeanDefinition;
import com.fary.context.annotation.Bean;
import com.fary.context.annotation.Configuration;
import com.fary.context.annotation.Role;
import com.fary.security.config.annotation.ObjectPostProcessor;

@Configuration(proxyBeanMethods = false)
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
public class ObjectPostProcessorConfiguration {

	@Bean
	@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
	public ObjectPostProcessor<Object> objectPostProcessor(AutowireCapableBeanFactory beanFactory) {
		return new AutowireBeanFactoryObjectPostProcessor(beanFactory);
	}
}